"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const react_1 = require("react");
const taro_1 = require("@tarojs/taro");
const components_1 = require("@tarojs/components");
class Index extends react_1.Component {
    constructor() {
        super(...arguments);
        this.state = {
            context: {}
        };
        this.getLogin = () => {
            taro_1.default.cloud
                .callFunction({
                name: "login",
                data: {}
            })
                .then(res => {
                this.setState({
                    context: res.result
                });
            });
        };
    }
    componentWillMount() { }
    componentDidMount() { }
    componentWillUnmount() { }
    componentDidShow() { }
    componentDidHide() { }
    render() {
        return (<components_1.View className='index'>
        <components_1.Button onClick={this.getLogin}>获取登录云函数</components_1.Button>
        <components_1.Text>context：{JSON.stringify(this.state.context)}</components_1.Text>
      </components_1.View>);
    }
}
exports.default = Index;
//# sourceMappingURL=index.weapp.jsx.map